package com.hnevc.caoliuye;

public class Homework {
    public static void main(String[] args) {
        int[][] y = new int[6][6];
        for (int i = 0; i < 6; i++) {
            y[i][0] = 1;
            y[i][i] = 1;
        }
        for (int i = 2; i < 6; i++)
            for (int j = 1; j < i; j++)
                y[i][j] = y[i - 1][j - 1] + y[i - 1][j];//循环语句

        for (int i = 0; i < 6; i++)
            for (int j = 0; j < i + 1; j++) {
                System.out.print(y[i][j] + " ");//输出打印数字图形
                if (j == i)
                    System.out.println();

            }
    }
}
